<template>
	<view class="be-cells">
		<view class="be-card">
			<view class="flex-center">
				<image class="b-icon" src="../../static/images/hs/icon1.png" mode=""></image>
				<view class="flex_bd">
					<view class="tt">手动导入</view>
					<view class="desc">Manual import</view>
				</view>
				<button class="btn-manual" @click="openUrl('/pages/beHospital/manualImport')" type="default">立即导入</button>
			</view>
			<image src="../../static/images/hs/bg1.png" class="bg" mode=""></image>
		</view>
		<view class="be-card">
			<view class="flex-center">
				<image class="b-icon" src="../../static/images/hs/icon2.png" mode=""></image>
				<view class="flex_bd">
					<view class="tt">扫描导入</view>
					<view class="desc">Manual import</view>
				</view>
				<button class="btn-scan" type="default" @click="showScan">立即导入</button>
			</view>
			<image src="../../static/images/hs/bg2.png" class="bg" mode=""></image>
		</view>
		<!-- 扫描 -->
		<u-popup width="690" v-model="show" mode="center" border-radius="14" closeable>
			<view class="improt-main">
				<view class="import-hd">扫描导入</view>
				<view class="select-cells flex-center justify-zBetween">
					<view class="select-box" @click="cur = 1">
						<view class="select-icon" :class="cur == 1?'active':''">
							<image src="../../static/images/hs/card.png" class="ic" mode=""></image>
							<image src="../../static/images/hs/check.png" class="check" mode=""></image>
						</view>
						<view class="text">身份证</view>
					</view>
					<view class="select-box" @click="cur = 2">
						<view class="select-icon" :class="cur == 2?'active':''">
							<image src="../../static/images/hs/keshi.png" class="ic"></image>
							<image src="../../static/images/hs/check.png" class="check" mode=""></image>
						</view>
						<view class="text">专科室</view>
					</view>
				</view>
			</view>
		</u-popup>
		<u-popup width="370" v-model="show2" mode="center" border-radius="30" closeable>
			<view class="improt-main" style="padding: 40rpx 55rpx;">
				<view class="import-hd">扫描导入</view>
				<view class="select-bars">
					<view class="select-bar" @click="barcur = 1" :class="barcur == 1?'active':''">
						<view class="flex_bd">
							<text class="iconfont icon-credentials"></text>
						</view>
						<view class="text">身份证</view>
					</view>
					<view class="select-bar" @click="barcur = 2" :class="barcur == 2?'active':''">
						<view class="flex_bd">
							<text class="iconfont icon-keshi"></text>
						</view>
						<view class="text">转科室</view>
					</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show:false,
				show2:false,
				cur:1,
				barcur:1
			}
		},
		onLoad() {
			
		},
		methods: {
			showScan(){
				this.show = true
				this.show2 = true
			},
			openUrl(e) {
				console.log(e)
				uni.navigateTo({
					url:e
				});
			},
			
		}
	}
</script>

<style lang="scss">
	.improt-main{
		padding:40rpx 30rpx;
		text-align: center;
		.import-hd{
			font-size: 32rpx;
			font-weight: bold;
			text-align: center;
			margin-bottom: 30rpx;
		}
	}
	.select-bar{
		text-align: left;
		margin-bottom: 20rpx;
		display: flex;
		align-items: center;
		padding: 0 30rpx;
		height: 60rpx;
		border-radius: 6px;
		background-color: #e6edf6;
		color: #009fe8;
		font-size: 24rpx;
		&.active{
			background-color: #009fe8;
			color: #FFFFFF;
		}
	}
	.select-box{
		width: 300rpx;
		.select-icon{
			position: relative;
			display: flex;
			align-items: center;
			justify-content: center;
			background-color: #f6f6f8;
			height: 300rpx;
			border-radius: 5px;
			.ic{
				width: 226rpx;
				height: 226rpx;
			}
			.check{
				position: absolute;
				width: 40rpx;
				height: 40rpx;
				position: absolute;
				bottom: 20rpx;
				right: 20rpx;
				opacity: 0;
			}
			&.active{
				background-image: linear-gradient(to top right, #0092d5 , #57beed);
			}
			&.active .check{
				opacity: 1;
			}
		}
		.text{
			margin-top: 20rpx;
		}
	}
	page{
		background-color: #FFFFFF;
	}
	.be-cells{
		padding: 30rpx;
	}
	.be-card{
		position: relative;
		margin-bottom: 30rpx;
		button:after{
			display: none;
		}
		button{
			padding: 0;
			width: 156rpx;
			height: 56rpx;
			line-height: 56rpx;
			font-size: 24rpx;
			color: #FFFFFF;
			text-align: center;
			border-radius: 40px;
		}
		.btn-manual{
			background-color: #009fe8;
		}
		.btn-scan{
			background-color: #0b51a2;
		}
		.tt{
			font-size: 32rpx;
			margin-bottom: 10rpx;
		}
		.desc{
			opacity: .5;
			font-size: 24rpx;
		}
		.flex-center{
			height: 180rpx;
			padding:0 30rpx;
			position: relative;
			z-index: 99;
			color: #FFFFFF;
			.b-icon{
				width: 90rpx;
				height: 90rpx;
				margin-right: 30rpx;
			}
		}
		.bg{
			position: absolute;
			width: 690rpx;
			height: 180rpx;
			top: 0;
			right: 0;
		}
	}
	
</style>
